package com.hz.onlineshop.model.service

import com.hz.onlineshop.model.Network
import com.hz.onlineshop.model.entity.CategoryEntity
import com.hz.onlineshop.model.entity.ItemsEntity
import com.hz.onlineshop.model.entity.ResultData
import com.hz.onlineshop.model.entity.SliderEntity
import retrofit2.http.GET


interface MainService {
    @GET("recommand/banner")
    suspend fun getBanners(): ResultData<MutableList<SliderEntity>>

    @GET("category/list")
    suspend fun getCategoryList():ResultData<MutableList<CategoryEntity>>

    @GET("items/list")
    suspend fun getItemsList():ResultData<MutableList<ItemsEntity>>

    companion object {
        fun instance(): MainService {
            return Network.create(MainService::class.java)
        }
    }
}